package org.ling.xuan.dialog;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import org.jetbrains.annotations.Nullable;
import org.ling.xuan.entity.mo.SvnCommitCheck;
import org.ling.xuan.pannel.SvnCommitCheckPanel;

import javax.swing.*;
import java.util.List;

public class SvnCommitSureDialog extends DialogWrapper {
    private final SvnCommitCheckPanel panel;

    public SvnCommitSureDialog(@Nullable Project project, boolean canBeParent, List<SvnCommitCheck> commitChecks) {
        super(project, canBeParent);
        setTitle("Svn Info");
        panel = new SvnCommitCheckPanel(commitChecks);
        init();
    }

    @Override
    protected @Nullable JComponent createCenterPanel() {
        return panel;
    }

    public List<SvnCommitCheck> getSuccessFiles() {
        return panel.getSuccessFiles();
    }
}
